<template>
  <tr>
    <td><input type="checkbox"  v-model="obj.checked" /></td>
    <td>{{ obj.name }}</td>
    <td>{{ obj.price }}</td>

    <td>
      <button @click="jian">-</button>
      {{ obj.num }}
      <button @click="add">+</button>
    </td>
    <td>{{obj.price*obj.num}}</td>
    <td><button @click="del">删除</button></td>
  </tr>
</template>
<script>
export default {
    
  props: ["obj","index",],
  methods: {
    add() {
     this.$emit("addFn",this.index)
    },
    jian(){
        this.$emit("jianFn",this.index)
    },
    del(){
        this.$emit("delFn",this.index)
    }
  },
 
};
</script>

<style>
</style>